#include <iostream>
#include "IBuffer.h"

void ConditionVariable()
{
    Buffer buf{};
    Producer producer{buf};
    Consumer consumer{buf};

    std::thread t1{[&]()
    {
        producer.run(20);
    }};
    std::thread t2{[&]()
    {
        consumer.run(20);
    }};

    t1.join();
    t2.join();
}

int main()
{
    ConditionVariable();
    return 0;
}